<? 

	require("required/dbconnect.php"); 
	require("required/function.php"); 
	require("required/header.php"); 
	
	$id=$_GET['id'];
	$get_bill=mysql_query("select * from os_bill_details where uid=$id and status<0 order by create_date desc")or die(mysql_error());
	$count=mysql_num_rows($get_bill);
	$get_id=mysql_query("select * from os_member where id=$id");

	$a=mysql_fetch_array($get_id,MYSQL_ASSOC);

?>
				<table width="100%"  cellpadding="0" cellspacing="5" height="300">
				
								
						<Td valign="top">
							<table width="90%">
							<?	
								if($count==0)
								{
							?>
								<tr>
									<td align="center"> :: NO RECORD :: </td>
								</tr>
							<?	
								}
								else
								{
							?>
							<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post" name="frm">
							<tr>
								<td colspan="4">
								Expired/Cancelled purchase from <?= $a['name'] ?> <input type="button" value="Back" class="button" onClick="window.open('member_viewfull.php?id=<?= $id ?>','_self')">
								<table width="100%" bgcolor="#CCCCCC" cellpadding="1" cellspacing="1">
								<tr bgcolor="#F3F3F3" align="center">
									<td width="19%">Order number</td><td width="21%">Order date</td><td width="21%">Status</td><td width="22%">Receiver</td><td width="17%">Total amount </td>
								</tr>
							<?
									
									while($c=mysql_fetch_array($get_bill))
									{
																														
							?>
								<tr bgcolor="#FFFFFF" align="center">
									
									<td><a href="order_viewfull.php?id=<?= $c['id'] ?>"><?= $c['invoice_number'] ?></a></td><td><?= date("Y-m-d",strtotime($c['create_date'])) ?></td><td><?= billstatus_eng($c['status']) ?></td><td><?= $c['receiver_name'] ?></td>
									<td><font color="#FF0000"><?= number_format($c['total_amount'],2) ?></font></td>
								</tr>
							<? 	
										
								
									} 
							?>
								</table>
								</td>
							</tr>
							
							</form>
							<?
								}
							?>
							</table>
							
						</Td>
					
				
				 
				</table>
<? require("required/footer.php"); ?>